/*
 * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
 */
package com.bootdo.oa.domain;

public enum NotifyType {
    UNKNOWN("NA", "0"),
    DELIVER("发货提醒通知", "1"),
    STOCK_LOW("库存不足提醒通知", "2"),
    BUHUO_ORDER_FR_SUCCESS("补货成功，推荐人获得积分通知", "3"),
    MEMBER_ORDER_FR_SUCCESS("注册会员成功，获得积分通知", "4"),
    PROXY_FR_SUCCESS("推荐成功，获得积分通知", "5")
    ;

    private String name;
    private String value;

    NotifyType(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static NotifyType getByValue(String value) {
        NotifyType[] values = NotifyType.values();
        for (NotifyType productType : values) {
            if (productType.getValue().equals(value)) {
                return productType;
            }
        }
        return UNKNOWN;
    }
}
